package com.sgb.kjwl.model.entity.transport;

import android.text.TextUtils;

import com.sgb.kjwl.model.entity.transport.common.DiyFieldEntity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

public class OwnerGoodsDetailInfo implements Serializable {
    private Integer pattern;//"货源发布模式 0 普通模式  1 竞价模式"
    private String carLenName;//车长
    private String carTypeName;//车型
    private String cityName;//发货市
    private String cityNo;//发货地市编号
    private String companyAddress;//企业地址
    private String companyName;//企业名称
    private String companyNo;//企业No
    private String teamNo;//团队No
    private String contrcts;//联系人
    private String contrctsNumber;//联系人电话
    private String destCityName;//目的地市
    private String destCityNo;//目的地市编号
    private String destDetailAddress;//目的地详细地址
    private String destDistrictName;//目的地区
    private String destDistrictNo;//目的地区编号
    private float destLatitude;//v1.4 目的地坐标
    private float destLongitude;//v1.4 目的地坐标
    private String destProvinceName;//目的地省
    private String destProvinceNo;//目的地省编号
    private String detailAddress;//发货详细地址
    private String districtName;//发货区
    private String districtNo;//发货地区编号
    private List<DiyFieldEntity> diyField;//自定义字段
    private Long endTime;//报价截止时间
    private String freight;//运费
    private String goodsTypeName;//货物类型名称
    private String secondGoodsTypeName;//货物二级类型名称
    private String handleTypeName;//装卸方式
    private String handleTypeNo = "11";
    private String heightHurdle;//栏高
    private String invoice;//发票要求 (1 不开发票  2 普通发票 3增值税专用发票)
    private Integer isDump;//是否自卸 1 是 0 否
    private Integer isTrue;//v1.8 是否已推送 1已推送 2未推送
    private float latitude;//纬度
    private float longitude;//经度
    private String messagePrice;//信息费
    private String note;//备注
    private String payType;//支付方式
    private String provinceName;//发货省
    private String provinceNo;//发货地省编号
    private String receptionPeople;//v1.8 新增字段 => 收货人
    private String receptionPhone;//v1.8 新增字段 => 收货人电话
    private String sendPeople;//v1.8 新增字段 => 发货人
    private String sendPhone;//v1.8 新增字段 => 发货人电话
    private Long shipmentEndTime;//装货结束时间
    private Long shipmentTime;//装货开始时间
    private int startPointTime;//装货开始时间点 1-25 25 代表全天
    private Long sourceId;//货源id
    private String no;//货源No
    private Integer state;//"状态 0 待接单（接单中）/竞价中  1 已成交/已转订单   2 已结束/待处理"
    private Integer terminal;//"1：企业发布 / 2：团队发布" 3：个人发布
    private Long updateTime;//更新时间
    private String userNo;//
    private String weight;//重量

    private String imAccount;//货源发布人IM账号
    private String imToken;//网易云信token
    private String contrctsImAccount;//货源联系人IM账号
    private String lowestPrice;//经营邦app 最低报价
    private Integer carNumber;//经营邦app 意向车数

    private String volume;//体积
    private String packingModeName;//包装方式名称
    private String allFreight;//总运费
    private String freightUnit;//运费单位 1：元/趟，2：元/吨，3：元/方
    private OfferGoodsSourcePlaceEntity place;//装卸货地信息

    private List<ContactInfoEntity> contactInfo;//联系人电话
    private String username;//	货源发布人姓名
    private String freightType;//货源类型：0一口价 1电议

    private String connection;//联系人
    private String connectionPhone;//联系电话

    public String getConnection() {
        return connection;
    }

    public void setConnection(String connection) {
        this.connection = connection;
    }

    public String getConnectionPhone() {
        return connectionPhone;
    }

    public void setConnectionPhone(String connectionPhone) {
        this.connectionPhone = connectionPhone;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getIsDumpWords() {
        if (isDump == null) {
            return "";
        }
        switch (isDump) {
            case 1:
                return "自卸";
            case 0:
                return "非自卸";
        }
        return "";
    }

    public int getStartPointTime() {
        return startPointTime;
    }

    public void setStartPointTime(int startPointTime) {
        this.startPointTime = startPointTime;
    }

    public Integer getPattern() {
        return pattern;
    }

    public void setPattern(Integer pattern) {
        this.pattern = pattern;
    }

    public String getTeamNo() {
        return teamNo;
    }

    public void setTeamNo(String teamNo) {
        this.teamNo = teamNo;
    }

    public String getCarLenName() {
        return carLenName;
    }

    public void setCarLenName(String carLenName) {
        this.carLenName = carLenName;
    }

    public String getCarTypeName() {
        return carTypeName;
    }

    public void setCarTypeName(String carTypeName) {
        this.carTypeName = carTypeName;
    }

    public String getCityName() {
        if (cityName == null)
            return "";
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public List<ContactInfoEntity> getContactInfo() {
        return contactInfo;
    }

    public void setContactInfo(List<ContactInfoEntity> contactInfo) {
        this.contactInfo = contactInfo;
    }

    public String getCityNo() {
        return cityNo;
    }

    public void setCityNo(String cityNo) {
        this.cityNo = cityNo;
    }

    public String getCompanyAddress() {
        return companyAddress;
    }

    public void setCompanyAddress(String companyAddress) {
        this.companyAddress = companyAddress;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getCompanyNo() {
        return companyNo;
    }

    public void setCompanyNo(String companyNo) {
        this.companyNo = companyNo;
    }

    public String getContrcts() {
        return contrcts;
    }

    public void setContrcts(String contrcts) {
        this.contrcts = contrcts;
    }

    public String getContrctsNumber() {
        return contrctsNumber;
    }

    public void setContrctsNumber(String contrctsNumber) {
        this.contrctsNumber = contrctsNumber;
    }

    public String getDestCityName() {
        if (destCityName == null)
            return "";
        return destCityName;
    }

    public void setDestCityName(String destCityName) {
        this.destCityName = destCityName;
    }

    public String getDestCityNo() {
        return destCityNo;
    }

    public void setDestCityNo(String destCityNo) {
        this.destCityNo = destCityNo;
    }

    public String getDestDetailAddress() {
        return destDetailAddress;
    }

    public void setDestDetailAddress(String destDetailAddress) {
        this.destDetailAddress = destDetailAddress;
    }

    public String getDestDistrictName() {
        if (destDistrictName == null)
            return "";
        return destDistrictName;
    }

    public void setDestDistrictName(String destDistrictName) {
        this.destDistrictName = destDistrictName;
    }

    public String getDestDistrictNo() {
        return destDistrictNo;
    }

    public void setDestDistrictNo(String destDistrictNo) {
        this.destDistrictNo = destDistrictNo;
    }

    public float getDestLatitude() {
        return destLatitude;
    }

    public void setDestLatitude(float destLatitude) {
        this.destLatitude = destLatitude;
    }

    public float getDestLongitude() {
        return destLongitude;
    }

    public void setDestLongitude(float destLongitude) {
        this.destLongitude = destLongitude;
    }

    public String getDestProvinceName() {
        return destProvinceName;
    }

    public void setDestProvinceName(String destProvinceName) {
        this.destProvinceName = destProvinceName;
    }

    public String getDestProvinceNo() {
        return destProvinceNo;
    }

    public void setDestProvinceNo(String destProvinceNo) {
        this.destProvinceNo = destProvinceNo;
    }

    public String getDetailAddress() {
        return detailAddress;
    }

    public void setDetailAddress(String detailAddress) {
        this.detailAddress = detailAddress;
    }

    public String getDistrictName() {
        if (districtName == null)
            return "";
        return districtName;
    }

    public void setDistrictName(String districtName) {
        this.districtName = districtName;
    }

    public String getDistrictNo() {
        return districtNo;
    }

    public void setDistrictNo(String districtNo) {
        this.districtNo = districtNo;
    }

    public List<DiyFieldEntity> getDiyField() {
        return diyField;
    }

    public void setDiyField(List<DiyFieldEntity> diyField) {
        this.diyField = diyField;
    }

    public Long getEndTime() {
        return endTime;
    }

    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }

    public String getFreight() {
        return freight;
    }

    public void setFreight(String freight) {
        this.freight = freight;
    }

    public String getGoodsTypeName() {
        return goodsTypeName;
    }

    public void setGoodsTypeName(String goodsTypeName) {
        this.goodsTypeName = goodsTypeName;
    }

    public String getSecondGoodsTypeName() {
        return secondGoodsTypeName;
    }

    public void setSecondGoodsTypeName(String secondGoodsTypeName) {
        this.secondGoodsTypeName = secondGoodsTypeName;
    }

    /**
     * 货物类型名字
     * 包含一、二级
     *
     * @return
     */
    public String getGoodsTypesName() {
        String name = "";
        if (!TextUtils.isEmpty(goodsTypeName)) {
            name += !TextUtils.isEmpty(secondGoodsTypeName) ? goodsTypeName + "/" : goodsTypeName;
        }
        if (!TextUtils.isEmpty(secondGoodsTypeName)) {
            name += secondGoodsTypeName;
        }
        return name;
    }

    public String getHandleTypeName() {
        return handleTypeName;
    }

    public void setHandleTypeName(String handleTypeName) {
        this.handleTypeName = handleTypeName;
    }

    public String getHandleTypeNo() {
        return handleTypeNo;
    }

    public void setHandleTypeNo(String handleTypeNo) {
        this.handleTypeNo = handleTypeNo;
    }

    public String getHeightHurdle() {
        return heightHurdle;
    }

    public void setHeightHurdle(String heightHurdle) {
        this.heightHurdle = heightHurdle;
    }

    public String getInvoice() {
        return invoice;
    }

    public String getInvoiceWords() {
        switch (invoice) {
            case "1":
                return "不开发票";
            case "2":
                return "普通发票";
            case "3":
                return "增值税专用发票";
            default:
                return "";
        }
    }

    public void setInvoice(String invoice) {
        this.invoice = invoice;
    }

    public Integer getIsDump() {
        return isDump;
    }

    public void setIsDump(Integer isDump) {
        this.isDump = isDump;
    }

    public Integer getIsTrue() {
        return isTrue;
    }

    public void setIsTrue(Integer isTrue) {
        this.isTrue = isTrue;
    }

    public float getLatitude() {
        return latitude;
    }

    public void setLatitude(float latitude) {
        this.latitude = latitude;
    }

    public float getLongitude() {
        return longitude;
    }

    public void setLongitude(float longitude) {
        this.longitude = longitude;
    }

    public String getMessagePrice() {
        return messagePrice;
    }

    public void setMessagePrice(String messagePrice) {
        this.messagePrice = messagePrice;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getProvinceNo() {
        return provinceNo;
    }

    public void setProvinceNo(String provinceNo) {
        this.provinceNo = provinceNo;
    }

    public String getReceptionPeople() {
        return receptionPeople;
    }

    public void setReceptionPeople(String receptionPeople) {
        this.receptionPeople = receptionPeople;
    }

    public String getReceptionPhone() {
        return receptionPhone;
    }

    public void setReceptionPhone(String receptionPhone) {
        this.receptionPhone = receptionPhone;
    }

    public String getSendPeople() {
        return sendPeople;
    }

    public void setSendPeople(String sendPeople) {
        this.sendPeople = sendPeople;
    }

    public String getSendPhone() {
        return sendPhone;
    }

    public void setSendPhone(String sendPhone) {
        this.sendPhone = sendPhone;
    }

    public void setShipmentEndTime(Long shipmentEndTime) {
        this.shipmentEndTime = shipmentEndTime;
    }

    public void setShipmentTime(Long shipmentTime) {
        this.shipmentTime = shipmentTime;
    }

    public Long getSourceId() {
        return sourceId;
    }

    public void setSourceId(Long sourceId) {
        this.sourceId = sourceId;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getTerminal() {
        if (terminal == null)
            return 0;
        return terminal;
    }

    public void setTerminal(Integer terminal) {
        this.terminal = terminal;
    }

    public Long getShipmentEndTime() {
        return shipmentEndTime;
    }

    public Long getShipmentTime() {
        return shipmentTime;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    public String getUserNo() {
        return userNo;
    }

    public void setUserNo(String userNo) {
        this.userNo = userNo;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    public String getImAccount() {
        return imAccount;
    }

    public void setImAccount(String imAccount) {
        this.imAccount = imAccount;
    }

    public String getImToken() {
        return imToken;
    }

    public void setImToken(String imToken) {
        this.imToken = imToken;
    }

    public String getContrctsImAccount() {
        return contrctsImAccount;
    }

    public void setContrctsImAccount(String contrctsImAccount) {
        this.contrctsImAccount = contrctsImAccount;
    }

    public String getLowestPrice() {
        return lowestPrice;
    }

    public void setLowestPrice(String lowestPrice) {
        this.lowestPrice = lowestPrice;
    }

    public Integer getCarNumber() {
        return carNumber;
    }

    public void setCarNumber(Integer carNumber) {
        this.carNumber = carNumber;
    }

    public String getVolume() {
        return volume;
    }

    public void setVolume(String volume) {
        this.volume = volume;
    }

    public String getAllFreight() {
        return allFreight;
    }

    public void setAllFreight(String allFreight) {
        this.allFreight = allFreight;
    }

    public String getPackingModeName() {
        return packingModeName;
    }

    public void setPackingModeName(String packingModeName) {
        this.packingModeName = packingModeName;
    }

    public String getFreightType() {
        return freightType;
    }

    public void setFreightType(String freightType) {
        this.freightType = freightType;
    }

    public String getFreightUnit() {
        if (!TextUtils.isEmpty(freightUnit)) {
            if ("1".equals(freightUnit)) {
                freightUnit = "元/趟";
            } else if ("2".equals(freightUnit)) {
                freightUnit = "元/吨";
            } else if ("3".equals(freightUnit)) {
                freightUnit = "元/方";
            }
        }
        return freightUnit;
    }

    public void setFreightUnit(String freightUnit) {
        this.freightUnit = freightUnit;
    }

    public OfferGoodsSourcePlaceEntity getPlace() {
        return place;
    }

    public void setPlace(OfferGoodsSourcePlaceEntity place) {
        this.place = place;
    }

    @Override
    public String toString() {
        return "OwnerGoodsDetailInfo{" +
                "pattern=" + pattern +
                ", carLenName='" + carLenName + '\'' +
                ", carTypeName='" + carTypeName + '\'' +
                ", cityName='" + cityName + '\'' +
                ", cityNo='" + cityNo + '\'' +
                ", companyAddress='" + companyAddress + '\'' +
                ", companyName='" + companyName + '\'' +
                ", companyNo='" + companyNo + '\'' +
                ", contrcts='" + contrcts + '\'' +
                ", contrctsNumber='" + contrctsNumber + '\'' +
                ", destCityName='" + destCityName + '\'' +
                ", destCityNo='" + destCityNo + '\'' +
                ", destDetailAddress='" + destDetailAddress + '\'' +
                ", destDistrictName='" + destDistrictName + '\'' +
                ", destDistrictNo='" + destDistrictNo + '\'' +
                ", destLatitude=" + destLatitude +
                ", destLongitude=" + destLongitude +
                ", destProvinceName='" + destProvinceName + '\'' +
                ", destProvinceNo='" + destProvinceNo + '\'' +
                ", detailAddress='" + detailAddress + '\'' +
                ", districtName='" + districtName + '\'' +
                ", districtNo='" + districtNo + '\'' +
                ", diyField=" + diyField +
                ", endTime=" + endTime +
                ", freight='" + freight + '\'' +
                ", goodsTypeName='" + goodsTypeName + '\'' +
                ", secondGoodsTypeName='" + secondGoodsTypeName + '\'' +
                ", handleTypeName='" + handleTypeName + '\'' +
                ", handleTypeNo='" + handleTypeNo + '\'' +
                ", heightHurdle='" + heightHurdle + '\'' +
                ", invoice='" + invoice + '\'' +
                ", isDump=" + isDump +
                ", isTrue=" + isTrue +
                ", latitude=" + latitude +
                ", longitude=" + longitude +
                ", messagePrice='" + messagePrice + '\'' +
                ", note='" + note + '\'' +
                ", payType='" + payType + '\'' +
                ", provinceName='" + provinceName + '\'' +
                ", provinceNo='" + provinceNo + '\'' +
                ", receptionPeople='" + receptionPeople + '\'' +
                ", receptionPhone='" + receptionPhone + '\'' +
                ", sendPeople='" + sendPeople + '\'' +
                ", sendPhone='" + sendPhone + '\'' +
                ", shipmentEndTime=" + shipmentEndTime +
                ", shipmentTime=" + shipmentTime +
                ", sourceId=" + sourceId +
                ", no='" + no + '\'' +
                ", state=" + state +
                ", terminal=" + terminal +
                ", updateTime=" + updateTime +
                ", userNo='" + userNo + '\'' +
                ", weight='" + weight + '\'' +
                ", imAccount='" + imAccount + '\'' +
                ", imToken='" + imToken + '\'' +
                ", contrctsImAccount='" + contrctsImAccount + '\'' +
                ", lowestPrice='" + lowestPrice + '\'' +
                ", carNumber=" + carNumber +
                ", volume=" + volume +
                ", packingModeName='" + packingModeName + '\'' +
                ", allFreight=" + allFreight +
                ", freightUnit='" + freightUnit + '\'' +
                ", place=" + place +
                '}';
    }
}